package com.eco.fanliapp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eco.fanliapp.entity.AppUserSearchHistory;

public interface IAppUserSearchHistoryService extends IService<AppUserSearchHistory> {

    AppUserSearchHistory selectByUserId(Long userId);

    /**
     * 查询查券未购买次数
     *
     * @param flag      1 表示查未购买昨天 0 表示查未购买总的 2 查询总的
     * @param companyId
     * @return
     */
    int selectCountSearchCouponPeople(Integer companyId);

    /**
     * 昨天查询查券未购买次数
     *
     * @param i
     * @param companyId
     * @param startTime
     * @param endTime
     * @return
     */
    int yesterdaySelectCountSearchCouponPeople(int flag, Integer companyId, long startTime, long endTime);

    void saveHistory(long seconds);

	int selectCountSearchCouponPeopleNew(Integer flag, Integer companyId, long startTime, long endTime);
}
